static_assert(DIM > 0, "Invalid vector dimension, it must be > 0.");
typedef Vector<DIM, T> VTYPE; //Vector type
public:

//ctor
Vector() { clear(); }
Vector(std::initializer_list<T> v) : Matrix(v) {}
Vector(const Vector<DIM, T>& src) : Matrix(reinterpret_cast<Matrix&>(src)) {}
//

/*@! Dot product operation */
T dot(const Vector<DIM, T>& v) const { register T d = static_cast<T>(0); for(int i = 0; i < DIM; i++) d += data[i] * v.data[i]; return d; }

/*@! Magnitude computation */
T magnitude() { register T v = 0; for(int i = 0; i < DIM; i++) v += data[i] * data[i]; return static_cast<T>(::sqrtl(v)); }

/*@! Unit Vector computation */
VTYPE unit() const { VTYPE u; register T len = magnitude(); for(int i = 0; i < DIM; i++) u[i] = data[i] / len; return u; }

VTYPE& operator = (const VTYPE& v) { for(int i = 0; i < DIM; i++) data[i] = v.data[i]; return *this; }
VTYPE& operator = (const T v[DIM]) { for(int i = 0; i < DIM; i++) data[i] = v[i]; return *this; }
VTYPE& operator = (std::initializer_list<T> v) { if(v.size() == DIM) std::copy(v.begin(), v.end(), data); else throw 1; }

bool operator == (const VTYPE& v) { for(int i = 0; i < DIM; i++) if(v.data[i] != data[i]) return false; return true; }
//

//constexpr bool canCrossProduct() { return (DIM == 3 || DIM == 7); }
